cls

Rem Redeploy solution

set SolutionName=Wagner.SharePoint.Utilities.SPDevTimerJob.wsp


stsadm -o deactivatefeature -id "{8FFB41B5-56FB-41b4-BA71-1EB5C9B0D39E}" -url http://localhost

@echo off
echo.
echo -------------------
echo Retract Solution ...
echo -------------------
@echo on
stsadm -o retractsolution -name %SolutionName% -local -url "http://localhost"

@echo off
echo.
echo -------------------
echo Delete Solution ...
echo -------------------
@echo on
stsadm -o deletesolution -name %SolutionName%

@echo off
echo.
echo -------------------
echo Add Solution ...
echo -------------------
@echo on
stsadm -o addsolution -filename %SolutionName%

@echo off
echo.
echo -------------------
echo Deploy Solution - by force ...
echo -------------------
@echo on
stsadm -o deploysolution -name %SolutionName% -local -force -allowgacdeployment -url "http://localhost"

stsadm -o activatefeature -id "{8FFB41B5-56FB-41b4-BA71-1EB5C9B0D39E}" -url http://localhost

@echo off
echo.
echo -------------------
echo Reset IIS -or- Recycle the Application Pool...
echo -------------------
if NOT "%IISAppPool80%"=="" (
echo.
echo Recycling IIS Application Pool: %IISAppPool80%
if NOT "%IISAppPool80%"=="" iisapp /a "%IISAppPool80%" /r
) else (
iisreset /noforce
)